<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%@ taglib tagdir="/WEB-INF/tags" prefix="p" %>
<%String ctx = request.getContextPath(); %>

<jsp:include page="../common/operate.jsp">
	<jsp:param name="title1" value="订单处理"/>
	<jsp:param name="title2" value=""/>
	<jsp:param name="isShowAddBtn" value="true"/>
	<jsp:param name="isShowUpdateBtn" value="true"/>
	<jsp:param name="isShowDeleteBtn" value="true"/>
</jsp:include>

<div class="f_l margin1" style="width:100%">
    <table width="100%">
    	<tbody>
    		<tr>
    			<td width="10%"><s:text name="预约人"/>：</td>
    			<td>${call.name}
    			  <s:if test="%{call.gender == 1}">先生</s:if>
    			  <s:if test="%{call.gender == 2}">女士</s:if>
    			</td>
    			<td><s:text name="下单时间"/>：</td>
    			<td><s:date name="call.createdDate" format="yyyy年MM月dd日hh:mm:ss"/></td>
    		</tr>
    		<tr>
    			<td><s:text name="手机"/>：</td>
    			<td>${call.mobile}</td>
    			<td><s:text name="邮箱"/>：</td>
    			<td>${call.email}</td>
    		</tr>
    		<tr>
    			<td><s:text name="地址"/>：</td>
    			<td>${call.address }</td>
    			<td><s:text name="订单内容"/>：</td>
    			<td colspan="3">${call.content}</td>
    		</tr>
    		<tr>
    			<td><s:text name="负责人"/>：</td>
    			<td>${call.inchargeUserName}</td>
    			<td><s:text name="状态"/>：</td>
    			<td><s:if test="%{call.status == 1}">新预订</s:if>
                    <s:if test="%{call.status == 2}">派送中</s:if>
                    <s:if test="%{call.status == 3}">已成交</s:if>
                    <s:if test="%{call.status == 4}">已取消</s:if></td>
    		</tr>
    		
        </tbody>
    </table>
</div>

<div style="width:100%" class="f_l margin1">
    <s:form id="listForm" method="POST" theme="simple">
	    <table width="98%" cellspacing="0" cellpadding="0" border="0" class="clear f_l padding3" id="tb">
	      <tbody>
		      <tr class="bg4_nav">
		        <td width="6%" class="t_c" style="border:0">
			      <input onclick="javascript:batchSelect(this)" type="checkbox" style="border:0" name="List_Selected2">
		        </td>
		        <td class="t_c" style="border:0">处理人</td>
		        <td class="t_c" style="border:0">处理时间</td>
		        <td class="t_c" style="border:0">状态</td>
		        <td class="t_c" style="border:0">内容反馈</td>
		      </tr>
		      <s:iterator value="pager.result" status="status">
		      <tr align="center">
		        <td class="border_tb"><input type="checkbox" style="border:0" name="ids" value="${id }"></td>
		        <td class="border_tb"><s:property value="inchargeUserName"/></td>
		        <td class="border_tb"><s:date name="recordDate" format="MM-dd HH:mm:ss"/></td>
		        <td class="border_tb"><s:if test="%{status == 1}">新预订</s:if>
                    <s:if test="%{status == 2}">派送中</s:if>
                    <s:if test="%{status == 3}">已成交</s:if>
                    <s:if test="%{status == 4}">已取消</s:if></td>
		        <td class="border_tb" align="left" width="60%"><s:property value="content"/></td>
		      </tr>
		      </s:iterator>
	      </tbody>
	    </table>
    </s:form>
    <div class="f_l margin1" style="width:100%">
      <p:page pager="${pager}" url="history!list.action" params="callId=${callId}" namespace="/call"/>
    </div> 
    <br>&nbsp;
    <div align="center"><input type="button" style="text-decoration:none" value="返回" onclick="javascript:history.back(-1);"/></div>
</div>

<script type="text/javascript">
$(window).ready(function(){
	addOperate('addButton','<%=ctx%>/call/history!add?callId=${callId}');
	updateOperate('updateButton','<%=ctx%>/call/history!edit');
	batchDelete('deleteButton','listForm','<%=ctx%>/call/history!deleteAll');
	isAllSelected('listForm');	
});
</script>